<?php
if (!defined('BASEPATH'))
	exit ('No direct script access allowed');

class Info extends CI_Controller {
	function __construct() {
		parent :: __construct();
		$this->load->model('show');
	}
	function index($types=0,$pageindex=0) {
		$types = intval($types);
		$pageindex = intval($pageindex);
		$this->load->library('pagination');
		$config['base_url'] = site_url("info/$types");
		$config['total_rows'] = $this->show->getCount($types);
		$config['per_page'] = 10;
		$config['uri_segment'] = 3;
		$config['num_links'] = 10;
		$config['first_link'] = '首页';
		$config['next_link'] = '下一页';
		$config['prev_link'] = '上一页';
		$config['last_link'] = '尾页';
		$this->pagination->initialize($config);
		$this->data['page'] = $this->pagination->create_links();
		$this->data['list'] = $this->show->getLists($pageindex, $config['per_page'],$types);
		$this->data['type_name'] = $types;
		$this->data['gg'] = $this->show->show_info(4);
		$this->load->view('info', $this->data);
	}
}